import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/home_controller.dart'; // 导入控制器
import '../../utils/resability.dart';

class DiscoverPage extends StatelessWidget {
  final HomeController controller = Get.put(HomeController());

  DiscoverPage({super.key}); // 初始化控制器

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: bg_color_light,
      appBar: AppBar(
        backgroundColor: bg_color_light,
        title: Align(
          child: Text(
            '探索',
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
        ),
      ),

      body: Align(
        child: Expanded(
          child: Column(
            children: [
              Flexible(flex: 1, child: SizedBox(height: 40)),
              Flexible(
                flex: 12,
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(20),
                  child: Image.asset('assets/images/fengmian/3.png'),
                ),
              ),
              Flexible(flex: 1, child: SizedBox(height: 10)),
              Flexible(
                flex: 2,
                child: Text(
                  '三体：死神永生',
                  style: TextStyle(color: Colors.white, fontSize: 30),
                ),
              ),
              Flexible(flex: 1, child: SizedBox(height: 10)),

              Flexible(
                child: Text(
                  '刘慈欣',
                  style: TextStyle(color: text_color, fontSize: 20),
                ),
              ),
              Flexible(flex: 1, child: SizedBox(height: 30)),

              Container(
                height: 1,
                color: const Color.fromARGB(255, 75, 79, 94),
                width: 250,
              ),
              Flexible(flex: 1, child: SizedBox(height: 20)),
              Flexible(
                flex: 1,
                child: Row(
                  spacing: 5,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    ClipRRect(
                      borderRadius: BorderRadius.circular(20),
                      child: Image.asset(
                        'assets/images/zuozhe/zuojia1.png',
                        width: 40,
                        height: 40,
                      ),
                    ),
                    ClipRRect(
                      borderRadius: BorderRadius.circular(20),
                      child: Image.asset(
                        'assets/images/zuozhe/zuojia2.png',
                        width: 40,
                        height: 40,
                      ),
                    ),
                    ClipRRect(
                      borderRadius: BorderRadius.circular(20),
                      child: Image.asset(
                        'assets/images/zuozhe/zuojia3.png',
                        width: 40,
                        height: 40,
                      ),
                    ),
                    ClipRRect(
                      borderRadius: BorderRadius.circular(20),
                      child: Image.asset(
                        'assets/images/zuozhe/zuojia4.png',
                        width: 40,
                        height: 40,
                      ),
                    ),
                  ],
                ),
              ),
              Flexible(flex: 1, child: SizedBox(height: 10)),

              Flexible(
                child: Text(
                  '454人已阅读',
                  style: TextStyle(color: text_color_light, fontSize: 15),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
